package com.ct.application.shipping.model.po;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * 船员出勤搜索对象
 */
@Data
public class ChuanYuanChuQinSearchPO {

    /**
     * 开始日期
     */
    private String kaiShiRiQi;

    /**
     * 结束日期
     */
    private String jieShuRiQi;

    /**
     * 船员名字
     */
    private String chuanYuanMing;


    public String getKaiShiRiQi() {
        if (kaiShiRiQi.length() > 7) {
            return kaiShiRiQi;
        }
        return kaiShiRiQi +"-01";
    }

    public String getJieShuRiQi() {
        if (kaiShiRiQi.length() > 7) {
            return jieShuRiQi;
        }
        return jieShuRiQi+"-01";
    }

    /**
     * 船舶名称，全选就传递值为: 全选
     */
    private String chuanBoMing;

    /**
     * 职位，全选就传递值为: 全选
     */
    private String zhiWei;

    public String getChuanBoMing() {
        if (StringUtils.isEmpty(chuanBoMing)) {
            chuanBoMing = "全选";
        }
        return chuanBoMing;
    }

    public String getZhiWei() {
        if (StringUtils.isEmpty(zhiWei)) {
            zhiWei = "全选";
        }
        return zhiWei;
    }

}
